
var ul = document.getElementById('nav-list'),
    content = document.getElementById('content')
    ;


'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split('').forEach(function (v) {

    ul.appendChild(newChild(v));




    content.appendChild(newSection(v));
});





ul.ontouchmove = function (e) {
    console.log(e.target.innerHTML);
}

function createNav(id) {
    var a = document.createElement('a');
    a.href = '#s-' + id;
    a.innerHTML = id;
    return a;
}
function newChild(text) {
    var li = document.createElement('li');
    li.appendChild(createNav(text));

    return li;
}
function newSection(text) {
    var section = document.createElement('section');
    section.innerHTML = text;
    section.id = 's-' + text;
    return section;
}